<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title> - 玩家订单</title>
	<meta name="keywords" content="">
	<meta name="description" content="">
	<link rel="shortcut icon" href="favicon.ico"> <link href="__STATIC__/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
	<link href="__STATIC__/css/font-awesome.css?v=4.4.0" rel="stylesheet">
	<link href="__STATIC__/css/plugins/jqgrid/ui.jqgrid.css?0820" rel="stylesheet">
	<link href="__STATIC__/css/animate.css" rel="stylesheet">
	<link href="__STATIC__/css/style.css?v=4.1.0" rel="stylesheet">
	<link href="__STATIC__/css/new_file.css" rel="stylesheet">
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
	<div class="row">
		<div class="col-sm-12">
			<div class="ibox ">
				<div class="ibox-title">
					<h5>玩家订单</h5>
				</div>
				<div class="toogl_body">
					<a href="Order.html"><button type="button" class="btn btn-w-m btn-bt btn-info">玩家订单</button></a>
					<a href="Order_1.html"><button type="button" class="btn btn-w-m btn-white btn-bt">会长订单</button></a>
					<div class="ibox-content ibox-jqGrid">
						<div class="form-group mmp-gbl"><br/>
							<label class="col-sm-2 control-dy">订单号：</label>
							<div class="col-sm-8 form-time1">
								<input type="text" placeholder="请输入订单号" class="form-control form-time-bk" id="id">
							</div>
							<label class="col-sm-2 control-dy">玩家ID：</label>
							<div class="col-sm-8 form-time1">
								<input type="text" placeholder="请输入玩家ID" class="form-control form-time-bk" id="player_id">
							</div>
							<label class="col-sm-2 control-dy">商品ID：</label>
							<div class="col-sm-8 form-time1">
								<input type="text" placeholder="请输入商品ID" class="form-control form-time-bk" id="product_id">
							</div>
							<label class="col-sm-2 control-dy">查询时间：</label>
							<div class="col-sm-8 form-time1">
								<input type="text" placeholder="查询时间" class="form-control form-time-bk" id="time" readonly="readonly">
							</div>
							<label class="col-sm-2 control-dy">订单状态：</label>
							<div class="col-sm-8 form-time1">
								<select class="form-control form-select" id="order_status">
									<option value="">请选择状态</option>
									<option value="0">支付中</option>
									<option value="1">支付成功</option>
									<option value="2">支付失败</option>
								</select>
							</div>	　
							<button type="button" class="btn btn-info"  id="player_search">查询</button>
						</div>
						<div class="jqGrid_wrapper">
							<table id="table_list_1"></table>
							<div id="pager_list_1"></div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
<!-- 全局js -->
<!--手机导航-->
<div class="to-fdh" style="display: none;">
	<img class="to-imgd" src="__STATIC__/img/phonedh.jpg">
	<div class="mob-nrlb">
		<ul>
			<li>
				<a class="mob-nrdh">管理</a>
				<ul class="mob-nryc">
					<li class="mob-nrdhli">
						<a href="{:url('Player/gameplayer')}">玩家管理</a>
					</li>
					<li class="mob-nrdhli">
						<a href="{:url('system/notice')}">公告管理</a>
					</li>
					<li class="mob-nrdhli">
						<a href="{:url('email/mail')}">邮件管理</a>
					</li>
					<li class="mob-nrdhli">
						<a href="{:url('Club/club')}">亲友圈管理</a>
					</li>
					<li class="mob-nrdhli">
						<a href="{:url('Money/money')}">提现管理</a>
					</li>
					<li class="mob-nrdhli">
						<a href="{:url('Order/order')}">订单管理</a>
					</li>
				</ul>
			</li>
			<li>
				<a class="mob-nrdh">数据</a>
				<ul class="mob-nryc">
					<li class="mob-nrdhli">
						<a href="{:url('data/datagk')}">概況</a>
					</li>
					<li class="mob-nrdhli">
						<a href="{:url('data/datawf')}">玩法</a>
					</li>
					<li class="mob-nrdhli">
						<a href="{:url('data/datalc')}">留存</a>
					</li>
					<li class="mob-nrdhli">
						<a href="{:url('data/datass')}">实时数据</a>
					</li>
					<li class="mob-nrdhli">
						<a href="{:url('data/dataczfx')}">充值分析</a>
					</li>
					<li class="mob-nrdhli">
						<a href="{:url('data/dataclub')}">亲友圈统计</a>
					</li>
					<li class="mob-nrdhli">
						<a href="{:url('data/president')}">高级会长</a>
					</li>
					<li class="mob-nrdhli">
						<a href="{:url('data/regionaldata')}">地区数据</a>
					</li>
				</ul>
			</li>
			<li>
				<a class="mob-nrdh mob-qbh">权限</a>
				<ul class="mob-nryc">
					<li class="mob-nrdhli">
						<a href="{:url('rule/rule_list')}">权限管理</a>
					</li>
					<li class="mob-nrdhli">
						<a href="{:url('rule/rule_group')}">用户组管理</a>
					</li>
					<li class="mob-nrdhli">
						<a href="{:url('account/account_details')}">后台账号管理</a>
					</li>
				</ul>
			</li>
		</ul>
	</div>
</div>
<div id="zkbg">
	<img src="__STATIC__/img/dp.gif">
</div>
<div class="vnl-zz" style="display:none">
	<div><img src="__STATIC__/img/bqhp.gif"></div>
</div>
<!--手机适配-->
<script src="__STATIC__/js/jquery.min.js?v=2.1.4"></script>
<script src="__STATIC__/js/bootstrap.min.js?v=3.3.6"></script>
<script src="__STATIC__/js/plugins/peity/jquery.peity.min.js"></script>
<script src="__STATIC__/js/plugins/jqgrid/i18n/grid.locale-cn.js?0820"></script>
<script src="__STATIC__/js/plugins/jqgrid/jquery.jqGrid.min.js?0820"></script>
<script src="__STATIC__/js/content.js?v=1.0.0"></script>
<script src="__STATIC__/js/plugins/laydate/laydate.js"></script>
<script>
    //手机适配
    $(function(){
        if ((navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i))) {
            $("head").append("<link>");
            var css = $("head").children(":last");
            css.attr({
                rel:  "stylesheet",
                type: "text/css",
                href: "__STATIC__/css/phone_sp.css"
            });
            var mql = window.matchMedia("(orientation: portrait)");
            if(mql.matches) { //竖屏样式
                $(".vnl-zz").show();
                $(".to-fdh").hide();
            }else{
                $(".to-fdh").show();
                $("html").width("100%");
                $("body").width("100%");
            }
            mql.addListener(function(m) {
                if(m.matches) {
                    // 改变到直立方向
                    $(".vnl-zz").show();
                    $(".to-fdh").hide();
                }
                else {
                    $(".to-fdh").show();
                    $(".vnl-zz").hide();
                    $("html").width("100%");
                    $("body").width("100%");
                }
            });
        }
    });
    //导航显示展开
    $(".mob-nrdh").click(function(){
        $(this).next().toggle(".mob-nryc");
    });
    $(".to-imgd").click(function(){
        $(this).next().toggle(".mob-nrlb");
    });
    //手机适配end
	</script>
</body>	<!--修改end-->
<script src="__STATIC__/js/jquery.min.js?v=2.1.4"></script>
<script src="__STATIC__/js/bootstrap.min.js?v=3.3.6"></script>
<script src="__STATIC__/js/plugins/peity/jquery.peity.min.js"></script>
<script src="__STATIC__/js/plugins/jqgrid/i18n/grid.locale-cn.js?0820"></script>
<script src="__STATIC__/js/plugins/jqgrid/jquery.jqGrid.min.js?0820"></script>
<script src="__STATIC__/js/content.js?v=1.0.0"></script>
<script src="__STATIC__/js/plugins/laydate/laydate.js"></script>
<script>

    $('#player_search').on('click', function() {
        var id = $('#id').val(); //订单号
        var player_id = $('#player_id').val(); //玩家ID
        var product_id = $('#product_id').val(); //商品ID
        var times = $('#time').val();      //时间
        var order_status = $('#order_status').val();      //时间
		if(times == ""){
            var start_time = "";
            var end_time = "";
		}else {
            var start_time = times.substring(0,10);
            var end_time = times.substring(13);
		}

        $("#table_list_1").jqGrid('setGridParam',{
            url:'__URL__/player_serach',
            datatype:'json',
            postData:{'id':id,'player_id':player_id,'product_id':product_id,'start_time':start_time,'end_time':end_time,'order_status':order_status},
            page:1
        }).trigger("reloadGrid"); //重新载入

    });



    $(document).ready(function () {

        $.jgrid.defaults.styleUI = 'Bootstrap';
        // Examle data for jqGrid
        var mydata = [
            {
                id: "1",
                invdate: "2010-05-24",
                name: "test",
                note: "note",
                tax: "10.00",
                total: "2111.00"
            }
        ];

        $("#table_list_1").jqGrid({
            // url:'__URL__/player_serach',
            postData:{},
            datatype: "json",
            mtype: 'POST',
            // data: mydata,
            // datatype: "local",
            height: 450,
            autowidth: true,
            shrinkToFit: true,
            rowNum: 20,
            rowList: [20,50,100],
            colNames: ['订单号', '玩家ID', '玩家昵称', '亲友圈昵称',  '商品ID' , '数量',  '支付金额',  '渠道',  '订单状态','订单时间','商品类型'],
            colModel: [
                {
                    name: 'id',
                    index: 'id',
                    width: 60,
                    sorttype: "int",
                    sortable: false,
                    align:'center'
                },
                {
                    name: 'player_id',
                    index: 'player_id',
                    width: 60,
                    sorttype: "int",
                    sortable: false,
                    align:'center'
                },
                {
                    name: 'nickname',
                    index: 'nickname',
                    width: 60,
                    sorttype: "int",
                    sortable: false,
                    align:'center'
                },
                {
                    name: 'club_name',
                    index: 'club_name',
                    width: 60,
                    sorttype: "int",
                    sortable: false,
                    align:'center'
                },
                {
                    name: 'product_id',
                    index: 'product_id',
                    width: 60,
                    sorttype: "int",
                    sortable: false,
                    align:'center'
                },
                {
                    name: 'product_amount',
                    index: 'product_amount',
                    width: 60,
                    sorttype: "int",
                    sortable: false,
                    align:'center'
                },
                {
                    name: 'fee',
                    index: 'fee',
                    width: 60,
                    sorttype: "int",
                    sortable: false,
                    align:'center'
                },
                {
                    name: '',
                    index: '',
                    width: 60,
                    sorttype: "int",
                    sortable: false,
                    align:'center'
                },
                {
                    name: 'order_status',
                    index: 'order_status',
                    width: 60,
                    sorttype: "int",
                    sortable: false,
                    formatter:function(order_status){
                        switch(Number(order_status)){
                            case 0:
                                return '<span style="color:#00BFFF"><b>未支付</b></span>';
                            case 1:
                                return '<span style="color:#1ac91a"><b>支付成功</b></span>';
                            case 2:
                                return '<span style="color:#FF0000"><b>支付失败</b></span>';
                        }
                    },
                    align:'center'
                },
                {
                    name: 'order_time',
                    index: 'order_time',
                    width: 60,
                    sorttype: "int",
                    sortable: false,
                    align:'center'
                },
            	{
                    name: 'goods_type',
                    index: 'goods_type',
                    width: 60,
                    sorttype: "int",
                    sortable: false,
                    formatter:function(goods_type){
                        switch(Number(goods_type)){
                            case 10001:
                                return '蓝钻';
                            case 10003:
                                return '黄钻';
                            case 10004:
                                return 'VIP卡';
                        }
                    },
                    align:'center'
                }
            ],
            pager: "#pager_list_1",
            viewrecords: true,
            loadonce: true,
            caption: "玩家订单",
            hidegrid: false
        });


        
		setTimeout(function(){
            var width = $('.jqGrid_wrapper').width();
            $('#table_list_1').setGridWidth(width);
		},500);
        
        
        laydate.render({
            elem: '#time'
            ,range: true
        });
    });
</script>
</html>
